﻿using System.Collections.Generic;
using System.ServiceModel;
using Sinacor.Infra.Service.Security.Services;
using Sinacor.Infra.Common.Exceptions.FaultContracts;
using Sinacor.Infra.Common.Exceptions;
using Sinacor.Infra.Service.ExceptionHandling;

namespace Sinacor.Servico.Bovespa.ManutencaoOrdens.Service.ServiceContract
{
    [ExceptionShielding]
    [ServiceContract(Namespace = "http://www.bovespa.com.br/Sinacor.Servico.Bovespa.ManutencaoOrdens.Service.ServiceContract", SessionMode = SessionMode.Allowed, Name = "IJustificativa")]
    public interface IJustificativa
    {
        [FaultContract(typeof(BusinessFault))]
        [FaultContract(typeof(ValidationFault))]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(InvalidSessionFault))]
        [FaultContract(typeof(LicensingFault))]
        [FaultContract(typeof(AccessIsDeniedFault))]
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "ConsultarJustificativas")]
        List<DataContract.Response.JustificativaResponse> ConsultarJustificativas(DataContract.Request.ChaveOrdemRequest request);

        [FaultContract(typeof(BusinessFault))]
        [FaultContract(typeof(ValidationFault))]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(InvalidSessionFault))]
        [FaultContract(typeof(LicensingFault))]
        [FaultContract(typeof(AccessIsDeniedFault))]
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "ObterJustificativa")]
        DataContract.Response.JustificativaResponse ObterJustificativa(DataContract.Request.FiltroJustificativa request);

        [FaultContract(typeof(BusinessFault))]
        [FaultContract(typeof(ValidationFault))]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(InvalidSessionFault))]
        [FaultContract(typeof(LicensingFault))]
        [FaultContract(typeof(AccessIsDeniedFault))]
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "AlterarJustificativa")]
        void AlterarJustificativa(DataContract.Request.JustificativaRequest request);

        [FaultContract(typeof(BusinessFault))]
        [FaultContract(typeof(ValidationFault))]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(InvalidSessionFault))]
        [FaultContract(typeof(LicensingFault))]
        [FaultContract(typeof(AccessIsDeniedFault))]
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "AlterarJustificativas")]
        void AlterarJustificativas(List<DataContract.Request.JustificativaRequest> request);
    }

}